<!--
*Author：富行天下团队
 
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Food/Forderproduct.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/Food/Forderproduct.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'order_product_id',
                    footer: "Foots",
                    cnName: '订单商品记录表',
                    name: 'Forderproduct',
                    url: "/Forderproduct/",
                    sortName: "order_product_id"
                },
                extend: extend,
                editFormFields: {},
                editFormOptions: [],
                searchFormFields: {"product_id":"","product_name":"","modifier":"","modifyID":"","modifyDate":"",},
                searchFormOptions: [[{"title":"商品id","field":"product_id","type":"text"},
                                     {"title":"商品名称","field":"product_name","type":"like"}],],
                columns: [{field:'order_product_id',title:'主键id',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'product_id',title:'商品id',type:'int',width:90,require:true,align:'left',sortable:true},
                       {field:'product_name',title:'商品名称',type:'string',width:220,require:true,align:'left'},
                       {field:'image_id',title:'商品封面图id',type:'int',width:90,require:true,align:'left'},
                       {field:'deduct_stock_type',title:'库存计算方式(10下单减库存 20付款减库存)',type:'int',width:90,require:true,align:'left'},
                       {field:'spec_type',title:'规格类型(10单规格 20多规格)',type:'int',width:90,require:true,align:'left'},
                       {field:'spec_sku_id',title:'商品sku标识',type:'string',width:220,require:true,align:'left'},
                       {field:'product_sku_id',title:'商品规格id',type:'int',width:90,require:true,align:'left'},
                       {field:'product_attr',title:'商品规格信息',type:'string',width:220,require:true,align:'left'},
                       {field:'content',title:'商品详情',type:'string',width:90,require:true,align:'left'},
                       {field:'product_no',title:'商品编码',type:'string',width:120,require:true,align:'left'},
                       {field:'product_price',title:'商品价格(单价)',type:'decimal',width:90,require:true,align:'left'},
                       {field:'line_price',title:'商品划线价',type:'decimal',width:90,require:true,align:'left'},
                       {field:'product_weight',title:'商品重量(Kg)',type:'decimal',width:90,require:true,align:'left'},
                       {field:'is_user_grade',title:'是否存在会员等级折扣',type:'int',width:160,require:true,align:'left'},
                       {field:'grade_ratio',title:'会员折扣比例(0-10)',type:'int',width:90,require:true,align:'left'},
                       {field:'grade_product_price',title:'会员折扣的商品单价',type:'decimal',width:90,require:true,align:'left'},
                       {field:'grade_total_money',title:'会员折扣的总额差',type:'decimal',width:90,require:true,align:'left'},
                       {field:'coupon_money_sys',title:'平台优惠券抵扣',type:'decimal',width:90,align:'left'},
                       {field:'coupon_money',title:'优惠券折扣金额',type:'decimal',width:90,require:true,align:'left'},
                       {field:'points_money',title:'积分金额',type:'decimal',width:90,require:true,align:'left'},
                       {field:'points_num',title:'积分抵扣数量',type:'int',width:90,require:true,align:'left'},
                       {field:'points_bonus',title:'赠送的积分数量',type:'int',width:90,require:true,align:'left'},
                       {field:'total_num',title:'购买数量',type:'int',width:90,require:true,align:'left'},
                       {field:'total_price',title:'商品总价(数量×单价)',type:'decimal',width:90,require:true,align:'left'},
                       {field:'total_pay_price',title:'实际付款价(折扣和优惠后)',type:'decimal',width:90,require:true,align:'left'},
                       {field:'supplier_money',title:'供应商金额',type:'decimal',width:90,align:'left'},
                       {field:'sys_money',title:'平台结算金额',type:'decimal',width:90,align:'left'},
                       {field:'fullreduce_money',title:'满减金额',type:'decimal',width:90,align:'left'},
                       {field:'is_agent',title:'是否开启分销0否1是',type:'int',width:90,align:'left'},
                       {field:'is_ind_agent',title:'是否开启单独分销(0关闭 1开启)',type:'int',width:90,require:true,align:'left'},
                       {field:'agent_money_type',title:'分销佣金类型(10百分比 20固定金额)',type:'sbyte',width:160,require:true,align:'left'},
                       {field:'first_money',title:'分销佣金(一级)',type:'decimal',width:90,require:true,align:'left'},
                       {field:'second_money',title:'分销佣金(二级)',type:'decimal',width:90,require:true,align:'left'},
                       {field:'third_money',title:'分销佣金(三级)',type:'decimal',width:90,require:true,align:'left'},
                       {field:'is_comment',title:'是否已评价(0否 1是)',type:'int',width:90,require:true,align:'left'},
                       {field:'order_id',title:'订单id',type:'int',width:160,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'user_id',title:'用户id',type:'int',width:160,require:true,align:'left'},
                       {field:'product_source_id',title:'来源商品记录id',type:'int',width:90,require:true,align:'left'},
                       {field:'sku_source_id',title:'来源商品sku id',type:'int',width:160,align:'left'},
                       {field:'bill_source_id',title:'拼团等的拼团订单id',type:'int',width:160,align:'left'},
                       {field:'bag_price',title:'包装费',type:'decimal',width:90,require:true,align:'left'},
                       {field:'virtual_content',title:'虚拟物品内容',type:'string',width:180,require:true,align:'left'},
                       {field:'app_id',title:'小程序id',type:'int',width:160,require:true,align:'left'},
                       {field:'modifier',title:'修改人',type:'string',width:90,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:160,align:'left',sortable:true},
                       {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:160,align:'left',sortable:true},
                       {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:90,align:'left'},
                       {field:'merchantCode',title:'商户编码',type:'string',width:220,align:'left'},
                       {field:'merchantName',title:'商户名称',type:'string',width:220,align:'left'},
                       {field:'supplierCode',title:'供应商',type:'string',width:220,align:'left'}],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
